Skip to content

feat: ElevenLabs v3 support (eleven_v3 model + audio tags)#37

Merged
OwenMcGirr merged 3 commits intomainfrom
36-feat-elevenlabs-v3-support
Apr 11, 2026
Merged

feat: ElevenLabs v3 support (eleven_v3 model + audio tags)#37
OwenMcGirr merged 3 commits intomainfrom
36-feat-elevenlabs-v3-support

Conversation

@OwenMcGirr
Copy link
Copy Markdown
Collaborator

Summary

  • _ssmlToV3AudioTags() translates SSML to ElevenLabs v3 inline audio tags: <emphasis level="strong">[excited], <emphasis level="reduced">[whispers], <break>[pause], other tags stripped (content kept)
  • prepareText() routes to tag translation when modelId === "eleven_v3", strips for all other models
  • New typed fields on ElevenLabsTTSOptions: seed, languageCode, previousText, nextText, applyTextNormalization — included in request payload when set
  • 16 unit tests covering all tag translation cases and new request params

Test plan

  • npx jest src/__tests__/elevenlabs-v3.test.ts — all 16 tests pass
  • npm run build — clean build
  • Manual: synthesise with modelId: "eleven_v3" and SSML input — audio returns without error
  • Manual: seed param produces deterministic output across two identical requests

Closes #36

- Add _ssmlToV3AudioTags() to translate SSML to v3 inline audio tags:
  emphasis strong/moderate → [excited], reduced → [whispers], break → [pause]
- prepareText() now routes to tag translation for eleven_v3, strips for all other models
- Expose seed, languageCode, previousText, nextText, applyTextNormalization in ElevenLabsTTSOptions
- Include v3 params in buildRequestPayload() when set
- Add 16 unit tests covering tag translation and new request params

Closes #36
@willwade
Copy link
Copy Markdown
Owner

willwade commented Apr 11, 2026

Ok. Check PR #31 and speechmarkdown/speechmarkdown-js#108 I had a rough plan to get smd-js 108 accepted then update 31 to use the expressive tags from that. Just double check this doesn't conflict with that.

See also #24 (comment)

I have a feeling I might not be solving everything in your pr though. Just double check.

@OwenMcGirr OwenMcGirr merged commit b6c9a20 into main Apr 11, 2026
2 of 6 checks passed
@OwenMcGirr OwenMcGirr deleted the 36-feat-elevenlabs-v3-support branch April 11, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: ElevenLabs v3 support (eleven_v3 model + audio tags)

2 participants